<template>
  <div>
    <Login v-model:register="register" v-if="register" />
    <Register @custom-event="handleRegister" v-if="!register" />
  </div>
</template>

<script setup>
import { ref } from 'vue'

import Login from './Login.vue'
import Register from './Register.vue'

const register = ref(true)

// 处理注册/登录切换
const handleRegister = (isRegister) => {
  register.value = isRegister
}
</script>

<style scoped></style>

